|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.vtp.framework.interactions.core.support.Widget
org.eclipse.vtp.framework.interactions.voice.vxml.FormElement
org.eclipse.vtp.framework.interactions.voice.vxml.Field
public class Field
The Field class represents the <field> VXML element.
Each field within a Form element can have an initial prompt
that is played to the caller when the field is first entered during
processing. A field can be allow free-form entry of digits or a DTMF grammar
can provided to validate the entry. A field can also have a set of options
that the caller input is matched against. Be aware that field options do NOT
support the use of the AudioOutput element.
As a named element of a form, its value can be used in
ValueOutput and Script elements or returned to
the IVR system with the Submit action.
| Field Summary |
|---|
| Constructor Summary | |
|---|---|
Field(java.lang.String name)
Creates a new instance of Field with the specified name. |
|
Field(java.lang.String name,
Prompt prompt)
Creates a new instance of Field with the specified name and
opening prompt. |
|
Field(java.lang.String name,
java.lang.String expression)
Creates a new instance of Field with the specified name. |
|
Field(java.lang.String name,
java.lang.String expression,
Prompt prompt)
Creates a new instance of Field with the specified name and
opening prompt. |
|
Field(java.lang.String name,
java.lang.String expression,
java.lang.String condition)
Creates a new instance of Field with the specified name. |
|
Field(java.lang.String name,
java.lang.String expression,
java.lang.String condition,
Prompt prompt)
Creates a new instance of Field with the specified name and
opening prompt. |
|
| Method Summary | |
|---|---|
void |
addEventHandler(EventHandler eventHandler)
Adds the specified event handler to this field. |
void |
addFilledHandler(Filled filled)
Adds the specified filled handler to this field. |
void |
addGrammar(Grammar grammar)
Specifies the DTMF grammar to match the caller's entered digits against. |
void |
addOption(Option option)
Adds the specified option to the set of available options for this field. |
void |
clearProperty(java.lang.String propertyName)
Clears the value of a property in this field. |
EventHandler[] |
getEventHandlers()
Returns the list of event handlers for this field. |
Filled[] |
getFilledHandlers()
Returns the list of filled handlers for this field. |
Grammar[] |
getGrammar()
Returns the DTMF grammar to apply to the caller's input. |
Option[] |
getOptions()
Returns the list of options for this field. |
Prompt |
getPrompt()
Returns the opening prompt to play to the caller. |
java.lang.String[] |
getPropertyNames()
Returns the names of the properties of this field. |
java.lang.String |
getPropertyValue(java.lang.String propertyName)
Returns the value of the specified property or null if no
such property exists. |
java.lang.String |
getType()
Returns the type of the field. |
void |
removeEventHandler(EventHandler eventHandler)
Removes the specified event handler from this field. |
void |
removeFilledHandler(Filled filled)
Removes the specified filled handler from this field. NOTE: A filled handler element that is added to a field must NOT specify a mode. |
void |
removeOption(Option option)
Removes the specified option from the set of available options for this field. |
void |
setPrompt(Prompt prompt)
Sets the opening prompt to the specified Prompt. |
void |
setProperty(java.lang.String propertyName,
java.lang.String propertyValue)
Sets the value of a property in this field. |
void |
setType(java.lang.String type)
Sets the type of the field. |
protected void |
writeAttributes(org.xml.sax.helpers.AttributesImpl attributes)
Write the attribute members of this form element to the supplied set. |
protected void |
writeEventHandlers(org.xml.sax.ContentHandler outputHandler)
Write the event handlers of this field to the specified content handler. |
protected void |
writeFilledHandlers(org.xml.sax.ContentHandler outputHandler)
Write the filled handlers of this field to the specified content handler. |
protected void |
writeGrammar(org.xml.sax.ContentHandler outputHandler)
Writes this field's grammar to the specified content handler. |
protected void |
writeOptions(org.xml.sax.ContentHandler outputHandler)
Write the options in this field to the specified content handler. |
protected void |
writePrompt(org.xml.sax.ContentHandler outputHandler)
Writes this field's prompt to the specified content handler. |
protected void |
writeProperties(org.xml.sax.ContentHandler outputHandler)
Writes the properties of this field to the specified content handler. |
void |
writeWidget(org.xml.sax.ContentHandler outputHandler)
Writes the content of this widget to an XML content handler. |
| Methods inherited from class org.eclipse.vtp.framework.interactions.voice.vxml.FormElement |
|---|
getCondition, getExpression, getName, setCondition, setExpression, setName |
| Methods inherited from class org.eclipse.vtp.framework.interactions.core.support.Widget |
|---|
toString, writeAttribute, writeChildren, writeChildren, writeWidget, writeWidget |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Field(java.lang.String name)
throws java.lang.IllegalArgumentException,
java.lang.NullPointerException
Field with the specified name. The
sets of options, event handlers, filled handlers, and properties are
initially empty. No opening prompt is provided, and no DTMF grammar is
applied.
name - The name this field will be referred to by.
java.lang.IllegalArgumentException - If the specified name is empty.
java.lang.NullPointerException - If the specified name is null.
public Field(java.lang.String name,
Prompt prompt)
throws java.lang.IllegalArgumentException,
java.lang.NullPointerException
Field with the specified name and
opening prompt. The sets of options, event handlers, filled handlers, and
properties are initially empty. No DTMF grammar is applied.
name - The name this field will be referred to by.prompt - The opening prompt played to the caller.
java.lang.IllegalArgumentException - If the specified name is empty.
java.lang.NullPointerException - If the specified name is null.
public Field(java.lang.String name,
java.lang.String expression)
throws java.lang.IllegalArgumentException,
java.lang.NullPointerException
Field with the specified name. The
sets of options, event handlers, filled handlers, and properties are
initially empty. No opening prompt is provided, and no DTMF grammar is
applied.
name - The name this field will be referred to by.expression - See the documentation for FormElement.
java.lang.IllegalArgumentException - If the specified name is empty.
java.lang.IllegalArgumentException - If the specified expression is empty.
java.lang.NullPointerException - If the specified name is null.
public Field(java.lang.String name,
java.lang.String expression,
Prompt prompt)
throws java.lang.IllegalArgumentException,
java.lang.NullPointerException
Field with the specified name and
opening prompt. The sets of options, event handlers, filled handlers, and
properties are initially empty. No DTMF grammar is applied.
name - The name this field will be referred to by.expression - See the documentation for FormElement.prompt - The opening prompt played to the caller.
java.lang.IllegalArgumentException - If the specified name is empty.
java.lang.IllegalArgumentException - If the specified expression is empty.
java.lang.NullPointerException - If the specified name is null.
public Field(java.lang.String name,
java.lang.String expression,
java.lang.String condition)
throws java.lang.IllegalArgumentException,
java.lang.NullPointerException
Field with the specified name. The
sets of options, event handlers, filled handlers, and properties are
initially empty. No opening prompt is provided, and no DTMF grammar is
applied.
name - The name this field will be referred to by.expression - See the documentation for FormElement.condition - See the documentation for FormElement.
java.lang.IllegalArgumentException - If the specified name is empty.
java.lang.IllegalArgumentException - If the specified expression is empty.
java.lang.IllegalArgumentException - If the specified condition is empty.
java.lang.NullPointerException - If the specified name is null.
public Field(java.lang.String name,
java.lang.String expression,
java.lang.String condition,
Prompt prompt)
throws java.lang.IllegalArgumentException,
java.lang.NullPointerException
Field with the specified name and
opening prompt. The sets of options, event handlers, filled handlers, and
properties are initially empty. No DTMF grammar is applied.
name - The name this field will be referred to by.expression - See the documentation for FormElement.condition - See the documentation for FormElement.prompt - The opening prompt played to the caller.
java.lang.IllegalArgumentException - If the specified name is empty.
java.lang.IllegalArgumentException - If the specified expression is empty.
java.lang.IllegalArgumentException - If the specified condition is empty.
java.lang.NullPointerException - If the specified name is null.| Method Detail |
|---|
public java.lang.String getType()
public Prompt getPrompt()
public Grammar[] getGrammar()
public java.lang.String[] getPropertyNames()
public java.lang.String getPropertyValue(java.lang.String propertyName)
throws java.lang.NullPointerException
null if no
such property exists.
propertyName - The name of the property to find the value of.
null if no
such property exists.
java.lang.NullPointerException - If the supplied property name is
null.public Option[] getOptions()
public Filled[] getFilledHandlers()
public EventHandler[] getEventHandlers()
public void setType(java.lang.String type)
type - The type of the field.public void setPrompt(Prompt prompt)
Prompt.
prompt - The new opening prompt to be played to the caller.public void addGrammar(Grammar grammar)
grammar - The DTMF grammar to apply to the caller's input.
public void setProperty(java.lang.String propertyName,
java.lang.String propertyValue)
throws java.lang.NullPointerException
propertyName - The name of the property to set.propertyValue - The value to set the property to.
java.lang.NullPointerException - If the supplied property name or value is
null.
public void clearProperty(java.lang.String propertyName)
throws java.lang.NullPointerException
propertyName - The name of the property to clear.
java.lang.NullPointerException - If the supplied property name is
null.
public void addOption(Option option)
throws java.lang.NullPointerException
option - The option to add.
java.lang.NullPointerException - If the supplied option is null.
public void removeOption(Option option)
throws java.lang.NullPointerException
option - The option to remove.
java.lang.NullPointerException - If the supplied option is null.
public void addFilledHandler(Filled filled)
throws java.lang.NullPointerException
filled - The filled handler to be added.
java.lang.NullPointerException - If the supplied filled handler is
null.
public void removeFilledHandler(Filled filled)
throws java.lang.NullPointerException
filled - The filled handler to be removed.
java.lang.NullPointerException - If the supplied filled handler is
null.
public void addEventHandler(EventHandler eventHandler)
throws java.lang.NullPointerException
eventHandler - The event handler to add.
java.lang.NullPointerException - If the supplied event handler is
null.
public void removeEventHandler(EventHandler eventHandler)
throws java.lang.NullPointerException
eventHandler - The event handler to remove.
java.lang.NullPointerException - If the supplied event handler is
null.
public void writeWidget(org.xml.sax.ContentHandler outputHandler)
throws java.lang.NullPointerException,
org.xml.sax.SAXException
Widget
writeWidget in class WidgetoutputHandler - The handler to write this widget to.
java.lang.NullPointerException - If the supplied content handler is
null.
org.xml.sax.SAXException - If the writing of this widget fails.protected void writeAttributes(org.xml.sax.helpers.AttributesImpl attributes)
FormElement
writeAttributes in class FormElementattributes - The attribute set to write to.
protected void writePrompt(org.xml.sax.ContentHandler outputHandler)
throws java.lang.NullPointerException,
org.xml.sax.SAXException
outputHandler - The handler to write the prompt to.
org.xml.sax.SAXException - If the writing of the prompt fails.
java.lang.NullPointerException - If the supplied content handler is
null.
protected void writeGrammar(org.xml.sax.ContentHandler outputHandler)
throws java.lang.NullPointerException,
org.xml.sax.SAXException
outputHandler - The handler to write the properties to.
org.xml.sax.SAXException - If the writing of the grammar fails.
java.lang.NullPointerException - If the supplied content handler is
null.
protected void writeProperties(org.xml.sax.ContentHandler outputHandler)
throws java.lang.NullPointerException,
org.xml.sax.SAXException
outputHandler - The handler to write the properties to.
org.xml.sax.SAXException - If the writing of the properties fails.
java.lang.NullPointerException - If the supplied content handler is
null.
protected void writeOptions(org.xml.sax.ContentHandler outputHandler)
throws java.lang.NullPointerException,
org.xml.sax.SAXException
outputHandler - The content handler to write to.
java.lang.NullPointerException - If the supplied content handler is
null.
org.xml.sax.SAXException - If the writing of one of the options fails.
protected void writeFilledHandlers(org.xml.sax.ContentHandler outputHandler)
throws java.lang.NullPointerException,
org.xml.sax.SAXException
outputHandler - The content handler to write to.
java.lang.NullPointerException - If the supplied content handler is
null.
org.xml.sax.SAXException - If the writing of one of the filled handlers fails.
protected void writeEventHandlers(org.xml.sax.ContentHandler outputHandler)
throws java.lang.NullPointerException,
org.xml.sax.SAXException
outputHandler - The content handler to write to.
java.lang.NullPointerException - If the supplied content handler is
null.
org.xml.sax.SAXException - If the writing of one of the event handlers fails.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||